/**
 * Throw
 * 
 * 26/10/2013
 * 
 * Copyright GPL
 */
package com.jtmproject.struts.tulebox.classes;

import java.util.Random;

/**
 * This class simulates the thrown of the dice
 * @author Javier Tejedor
 */
public class Throw {

	private static final int TO_REACH_THE_EXCLUSIVE_NUMBER = 1;

	/**
	 * returns the result of the thrown
	 * @param sides
	 * @return
	 */
	public int resultThrow(int sides){
		
		// Returns a pseudorandom, uniformly distributed int value between 0 
		//(inclusive) and the specified value (exclusive)

		return new Random().nextInt(sides) + TO_REACH_THE_EXCLUSIVE_NUMBER;

	}

}
